﻿/**********************************************************************************************************************/
/* See License.txt file for details.                                                                                  */
/**********************************************************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;

namespace CodePlex.SqlServer.LocalDB.LocalDBCompanion
{
    static class Program
    {
        static Mutex instanceMutex;

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool isFirstInstance;
            instanceMutex = new System.Threading.Mutex(true, "{236B3310-B4BE-4034-B6B4-A82972E283EC}", out isFirstInstance);

            if (!isFirstInstance)
            {
                // instance already running, exit.
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LocalDBCompanionMain());
        }
    }
}
